package com.heima.apis.schedule;

import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import com.heima.model.schedule.dtos.Task;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews--schedule")
public interface IScheduleClient {

    @PostMapping("/api/v1/task/add")
    public ResponseResult addTask(@RequestBody Task task);

    /*
     * 删除任务
     * */
    @GetMapping("/api/v1/task/delete/{taskId}")
    public ResponseResult deleteTask(@PathVariable ("taskId") Long taskId);


    /*
     *
     * 按照类型和优先级拉去任务
     * */
    @GetMapping("/api/v1/task/pull/{Type}/{Priority}")
    public ResponseResult pull(@PathVariable ("Type") int Type,@PathVariable ("Priority") int Priority);
}
